package com.cmfi.domain;

import lombok.Data;

/**
 * 板链线速度，从PLC读取
 */
@Data
public class PlateChainLineSpeed {

	// 记录索引，key
	private Long id;

	// 所属产线
	private long line;//一共两条产线，两个点位

	// 电表读数值
	private double value;

	// 读取日期
	private String date;

	public Long getId() {
		return this.id;
	}

	public PlateChainLineSpeed id(Long id) {
		this.setId(id);
		return this;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public long getLine() {
		return line;
	}

	public void setLine(long line) {
		this.line = line;
	}

	public String getDate() {
		return this.date;
	}

	public PlateChainLineSpeed date(String date) {
		this.setDate(date);
		return this;
	}

	public void setDate(String date) {
		this.date = date;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof PlateChainLineSpeed)) {
			return false;
		}
		return id != null && id.equals(((PlateChainLineSpeed) o).id);
	}

	@Override
	public int hashCode() {
		return getClass().hashCode();
	}

	public double getValue() {
		return value;
	}

	public PlateChainLineSpeed value(double value) {
		this.setValue(value);
		return this;
	}

	public void setValue(double variant) {
		this.value = variant;
	}

	@Override
	public String toString() {
		return "EnergyRec [id=" + id + ", value=" + value + ", date=" + date + "]";
	}

}
